<?php
include 'rfq_check.php';
if (isset($_POST['txt_dioxideContent'])) {
    
    include 'rfq_do.php';
    include 'common/database.php';
    include '../business/white_manager.php';
    include '../entity/white_entity.php';

    $whiteEntity = new WhiteEntity;
    $whiteMng = new WhiteMng();

    $whiteEntity->id = "-1";
    $whiteEntity->rfqID = $rfqID;
    $whiteEntity->dioxideContent = $_POST['txt_dioxideContent'];
    $whiteEntity->dioxideType = $_POST['txt_dioxideType'];
    $whiteEntity->carrierType = $_POST['txt_carrierType'];
    $whiteEntity->endApp = $_POST['txt_endApp'];
    $whiteEntity->fillerRequired = $_POST['txt_fillerRequired'];
    $whiteEntity->specialRequirement = $_POST['txt_specialRequirement'];
    $whiteEntity->inTime = time();
    $whiteEntity->inUser = "-1";

    if ($whiteMng->update($mysqli, $whiteEntity)) {
        echo "<script>window.location.href='rfq_submit.php'</script>";
    }
} else {
    include 'common/smarty.php';
    $tpl->display('white.html');
}
?>
